﻿using System.Collections.Generic;
using FairyGUI;
using UnityEngine;
using UnityEditor;
using Utility.Inspector;
using Utility.Inspector.ReorderableList;
using Utility.Math;
using Utility.DataSystem;
using Utility;

namespace DataSystem
{
	public class GameSettingEditorWindow : SettingObjectEditorWindow<GameSettingObject>
	{
		protected override GUIContent TitleContent => new GUIContent ("游戏设定");
		protected override string SettingPath => EditorConstants.RootPath_GameSettings;

		[MenuItem ("Settings/游戏设定")]
		protected static void OpenWindow ()
		{
			OpenWindow<GameSettingEditorWindow> ();
		}

		[UnityEditor.Callbacks.OnOpenAsset (0)]
		protected static bool OnOpenAsset (int instId, int line)
		{
			return OnOpenAsset<GameSettingEditorWindow> (instId, line);
		}

		protected override void DrawSetting ()
		{

		
			//map
			DrawMapSettings ();

		
		}


		#region map

		private void DrawMapSettings ()
		{
			using (var container = ContainerScope.New ("GameSetting_MapSettings", "地图设置"))
			{
				if (container.ShowContent)
				{
					Setting.mapRadius = EditorGUILayout.IntField ("地图半径", Setting.mapRadius);
//					Setting.mapRandomTilegroupMaxCount = EditorGUILayout.IntField ("地图随机地块组最大数量", Setting.mapRandomTilegroupMaxCount);
//					Setting.mapVisualRange = EditorGUILayout.IntField ("地图视野半径", Setting.mapVisualRange);
//					Setting.mapEliteDelay = EditorGUILayout.IntField ("地图精英战延迟", Setting.mapEliteDelay);
				}
			}
		}

		#endregion

	

	
	}
}